#include <LPC22xx.h>
#include "DebugLED.h"

#define DEBUG_LED 0x00008000

void DebugLED::Init()
{
	FIO0DIR |= DEBUG_LED;
	Reset();
}

void DebugLED::Set()
{
	FIO0CLR = DEBUG_LED;
	m_CurrentState = true;
}

void DebugLED::Reset()
{
	FIO0SET = DEBUG_LED;
	m_CurrentState = false;
}

void DebugLED::Toggle()
{
	if (m_CurrentState )
	{
		Reset();
	}
	else
	{
		Set();
	}
}
